package io.nutz.nutzsite.module.acm.models;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Comment;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.One;
import org.nutz.dao.entity.annotation.Table;
		
/**
 * 解题结果表 acm_solution
 * 
 * @author lrw
 * @date 2020-02-16
 */
@Table("solution")
public class Solution implements Serializable {
	private static final long serialVersionUID = 1L;
	
			@Id
		@Column("solution_id")
	@Comment("解题号")
	private Integer solutionId;

			/** 题号 */
	@Column("problem_id")
	@Comment("题号")
	private Integer problemId;
	
	/*@One(field = "problemId")
    public Problem problem;*/
	/**题目标题*/
	private String title;

			/** 用户名 */
	@Column("username")
	@Comment("用户名")
	private String uid;

			/** 提交时间 */
	@Column("submit_date")
	@Comment("提交时间")
	private Date submitDate;

			/** 评判时间 */
	@Column("judge_date")
	@Comment("评判时间")
	private Date judgeDate;

			/** 占用内存 */
	@Column("memory")
	@Comment("占用内存")
	private Integer memory;

			/** 占用时间 */
	@Column("time")
	@Comment("占用时间")
	private Integer time;

			/** 代码长度 */
	@Column("code_length")
	@Comment("代码长度")
	private Integer codeLength;

			/** 编程语言 */
	@Column("language")
	@Comment("编程语言")
	private Integer language;

			/** 评判结果 */
	@Column("verdict")
	@Comment("评判结果")
	private Integer verdict;

			/** 竞赛编号 */
	@Column("contest_id")
	@Comment("竞赛编号")
	private Integer contestId;
	/** 考试号 */
@Column("ksid")
@Comment("考试号")
private String ksid;
			/** 测试用例 */
	@Column("testcase")
	@Comment("测试用例")
	private Integer testcase;

			/** 失败用例 */
	@Column("failcase")
	@Comment("失败用例")
	private Integer failcase;

			/** json结果 */
	@Column("json_result")
	@Comment("json结果")
	private String jsonResult;

	
	public void setSolutionId(Integer solutionId) 
	{
		this.solutionId = solutionId;
	}

	public Integer getSolutionId() 
	{
		return solutionId;
	}

	public void setProblemId(Integer problemId) 
	{
		this.problemId = problemId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Integer getProblemId() 
	{
		return problemId;
	}

	public void setUid(String uid) 
	{
		this.uid = uid;
	}

	public String getUid() 
	{
		return uid;
	}

	public void setSubmitDate(Date submitDate) 
	{
		this.submitDate = submitDate;
	}

	public Date getSubmitDate() 
	{
		return submitDate;
	}

	public void setJudgeDate(Date judgeDate) 
	{
		this.judgeDate = judgeDate;
	}

	public Date getJudgeDate() 
	{
		return judgeDate;
	}

	public void setMemory(Integer memory) 
	{
		this.memory = memory;
	}

	public Integer getMemory() 
	{
		return memory;
	}

	public void setTime(Integer time) 
	{
		this.time = time;
	}

	public Integer getTime() 
	{
		return time;
	}

	public void setCodeLength(Integer codeLength) 
	{
		this.codeLength = codeLength;
	}

	public Integer getCodeLength() 
	{
		return codeLength;
	}

	public void setLanguage(Integer language) 
	{
		this.language = language;
	}

	public Integer getLanguage() 
	{
		return language;
	}

	public void setVerdict(Integer verdict) 
	{
		this.verdict = verdict;
	}

	public Integer getVerdict() 
	{
		return verdict;
	}

	


	public Integer getContestId() {
		return contestId;
	}

	public void setContestId(Integer contestId) {
		this.contestId = contestId;
	}

	public void setTestcase(Integer testcase) 
	{
		this.testcase = testcase;
	}

	public Integer getTestcase() 
	{
		return testcase;
	}

	public void setFailcase(Integer failcase) 
	{
		this.failcase = failcase;
	}

	public Integer getFailcase() 
	{
		return failcase;
	}

	public void setJsonResult(String jsonResult) 
	{
		this.jsonResult = jsonResult;
	}

	public String getJsonResult() 
	{
		return jsonResult;
	}

	public String getKsid() {
		return ksid;
	}

	public void setKsid(String ksid) {
		this.ksid = ksid;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("solutionId", getSolutionId())
            .append("problemId", getProblemId())
            .append("uid", getUid())
            .append("submitDate", getSubmitDate())
            .append("judgeDate", getJudgeDate())
            .append("memory", getMemory())
            .append("time", getTime())
            .append("codeLength", getCodeLength())
            .append("language", getLanguage())
            .append("verdict", getVerdict())
            .append("contestId", getContestId())
            .append("testcase", getTestcase())
            .append("failcase", getFailcase())
            .append("jsonResult", getJsonResult())
            .toString();
    }
}
